import postMixin from "@theme/mixins/posts";
import localMixin from "@theme/mixins/locales";
import imageMixin from "@theme/mixins/image";
import { addLinkToHead } from "@theme/helpers/utils";
import { registerCodeThemeCss } from "@theme/helpers/other";

export default ({ Vue, siteData, isServer }) => {
  // Vue.mixin({
  //   mounted() {
  //     import("vue-canvas-effect").then(function (module) {
  //       console.log(module.default);
  //       Vue.use(module.default);
  //     });
  //   },
  // });
  Vue.mixin(postMixin);
  Vue.mixin(localMixin);
  Vue.mixin(imageMixin);
  if (!isServer) {
    addLinkToHead("//at.alicdn.com/t/font_1030519_2ciwdtb4x65.css");
    registerCodeThemeCss(siteData.themeConfig.codeTheme);
  }
};
